<template>
  <layout :showBg="false">
    <template #header>
      <pageHead title="提现" />
    </template>
    <view class="content">
      <view class="flex flex-c flex-a">
        <template v-if="status == 1">
          <image src="../../../assets/images/icons/success.png" />
          <view class="c-90 status">操作成功</view>
          <view  class="c-60 fs-28 reason">已发起提现，预计3个工作日内到账</view>
          <view class="flex active-btn btn" @click="back">确定</view>
          <view class="flex default-btn btn" @click="toHistory">查看提现记录</view>
        </template>
        <template v-else>
          <image src="../../../assets/images/icons/fail.png" />
          <view class="c-90 status">操作失败</view>
          <view class="c-60 fs-28 reason">这里是失败原因失败原因失败原因失败原因</view>
          <view class="active-btn btn" @click="back">确定</view>
        </template>
      </view>
    </view>
  </layout>
</template>
<script>
import layout from "../../../compennts/layout/index.vue";
import pageHead from "../../../compennts/pageHead/index.vue";
export default {
  components: {
    layout,
    pageHead,
  },
  data() {
    return {
      status: 1,
    };
  },
  onLoad(info){
    console.log('===>',info)
    this.status = info.type
    console.log(this.status)
  },
  onShow(){
    // this.status = Math.random() > 0.5 ? 1:0
  },
  methods: {
    back(){
        uni.navigateBack()
    },
    toHistory(){
        uni.navigateTo({
            url: '/pages/mine/wallet/drawHistory'
        })
    },
  },
};
</script>
<style lang="less" scoped>
@import url("../../../assets/styles/common.less");
.content {
  height: 100%;
  background: #f7f8ff;
  padding: 32rpx;
  image{
    width: 192rpx;
    height: 192rpx;
    margin-top:160rpx;

  }
  .status{
    font-size:40rpx;
    margin:24rpx 0;
  }
  .reason{
      margin-bottom:64rpx;
  }
  .btn{
    width: 100%;
    height: 88rpx;
    margin-top:32rpx;
  }
}
</style>
